package cn.yunyichina.provider.hisiface.service.impl;

import java.util.List;

import org.springframework.stereotype.Service;

import cn.yunyichina.provider.hisiface.service.AbstractService;
import cn.yunyichina.provider.iface.entity.common.ResCommon;
import cn.yunyichina.provider.iface.entity.hisiface.clinic.AckClinicExceptionVo;
import cn.yunyichina.provider.iface.entity.hisiface.clinic.AckClinicExceptionVoResponse;
import cn.yunyichina.provider.iface.entity.hisiface.clinic.AckClinicPayVo;
import cn.yunyichina.provider.iface.entity.hisiface.clinic.AckClinicPayVoResponse;
import cn.yunyichina.provider.iface.entity.hisiface.clinic.ClinicGuidanceVo;
import cn.yunyichina.provider.iface.entity.hisiface.clinic.ClinicGuidanceVoResponse;
import cn.yunyichina.provider.iface.entity.hisiface.clinic.ClinicInsuranceVo;
import cn.yunyichina.provider.iface.entity.hisiface.clinic.ClinicInsuranceVoResponse;
import cn.yunyichina.provider.iface.entity.hisiface.clinic.ClinicPrePriceVo;
import cn.yunyichina.provider.iface.entity.hisiface.clinic.ClinicPrePriceVoResponse;
import cn.yunyichina.provider.iface.entity.hisiface.clinic.ClinicQueueVo;
import cn.yunyichina.provider.iface.entity.hisiface.clinic.ClinicQueueVoResponse;
import cn.yunyichina.provider.iface.entity.hisiface.clinic.DeliveryInfoVo;
import cn.yunyichina.provider.iface.entity.hisiface.clinic.DeliveryInfoVoResponse;
import cn.yunyichina.provider.iface.entity.hisiface.clinic.DeliveryVo;
import cn.yunyichina.provider.iface.entity.hisiface.clinic.FeeDetailFdVoResponse;
import cn.yunyichina.provider.iface.entity.hisiface.clinic.FeeDetailFdaVoResponse;
import cn.yunyichina.provider.iface.entity.hisiface.clinic.FeeDetailVo;
import cn.yunyichina.provider.iface.entity.hisiface.clinic.FeeDetailVoResponse;
import cn.yunyichina.provider.iface.entity.hisiface.clinic.FeeVo;
import cn.yunyichina.provider.iface.entity.hisiface.clinic.FeeVoResponse;
import cn.yunyichina.provider.iface.entity.hisiface.clinic.FiredAndDeliveredVo;
import cn.yunyichina.provider.iface.entity.hisiface.clinic.FiredAndDeliveredVoResponse;
import cn.yunyichina.provider.iface.entity.hisiface.clinic.FiredFeeVo;
import cn.yunyichina.provider.iface.entity.hisiface.clinic.FiredFeeVoResponse;
import cn.yunyichina.provider.iface.entity.hisiface.clinic.PayClinicOrderVo;
import cn.yunyichina.provider.iface.entity.hisiface.clinic.PayClinicOrderVoResponse;
import cn.yunyichina.provider.iface.entity.hisiface.clinic.PayDetailVo;
import cn.yunyichina.provider.iface.entity.hisiface.clinic.PayDetailVoResponse;
import cn.yunyichina.provider.iface.entity.hisiface.clinic.PayVo;
import cn.yunyichina.provider.iface.entity.hisiface.clinic.PayVoResponse;
import cn.yunyichina.provider.iface.entity.hisiface.clinic.PrescriptionUploadVo;
import cn.yunyichina.provider.iface.entity.hisiface.clinic.PrescriptionUploadVoResponse;
import cn.yunyichina.provider.iface.entity.hisiface.clinic.RefundClinicInsuranceVo;
import cn.yunyichina.provider.iface.entity.hisiface.clinic.RefundClinicInsuranceZfqrVo;
import cn.yunyichina.provider.iface.entity.hisiface.clinic.SettleClinicInsuranceVo;

/**
 * 门诊服务接口
 * 
 * @author zhou
 */
@Service
public class HisifaceClinicServiceImpl extends AbstractService {

    /**
     * 门诊待缴费记录查询
     * 
     * @param feeVo
     * @return
     */
    public ResCommon<List<FeeVoResponse>> listClinicFee(FeeVo feeVo) {
    	String methodCode = "listClinicFee";
    	String methodName = "门诊待缴费记录查询";
    	
    	return doExecList(methodCode, methodName, feeVo, FeeVoResponse.class);
	}

    /**
     * 门诊待缴费记录明细查询
     * 
     * @param data
     * @param sessionId
     * @return
     */
    public ResCommon<List<FeeDetailVoResponse>> getClinicFeeDetail(FeeDetailVo feeDetailVo) {
    	String methodCode = "getClinicFeeDetail";
    	String methodName = "门诊待缴费记录明细查询";
    	
    	return doExecList(methodCode, methodName, feeDetailVo, FeeDetailVoResponse.class);
    }
    
    /**
     * 门诊待缴费记录明细查询（含代煎，整单配送）
     * 
     * @param feeDetailVo
     * @return
     */
    public ResCommon<FeeDetailFdaVoResponse> getClinicFeeDetailFda(FeeDetailVo feeDetailVo) {
    	String methodCode = "getClinicFeeDetailFda";
    	String methodName = "门诊待缴费记录明细查询（含代煎，整单配送）";
    	
    	return doExec(methodCode, methodName, feeDetailVo, FeeDetailFdaVoResponse.class);
    }
    
    /**
     * 门诊待缴费记录明细查询（含代煎，分单配送）
     * 
     * @param feeDetailVo
     * @return
     */
    public ResCommon<FeeDetailFdVoResponse> getClinicFeeDetailFd(FeeDetailVo feeDetailVo) {
    	String methodCode = "getClinicFeeDetailFd";
    	String methodName = "门诊待缴费记录明细查询（含代煎，分单配送）";
    	
    	return doExec(methodCode, methodName, feeDetailVo, FeeDetailFdVoResponse.class);
    }
    
    /**
     * 门诊缴费划价
     * 
     * @param getClinicPrePrice
     * @return
     */
    public ResCommon<ClinicPrePriceVoResponse> getClinicPrePrice(ClinicPrePriceVo clinicPrePriceVo) {
    	String methodCode = "getClinicPrePrice";
    	String methodName = "门诊缴费划价";
    	
    	return doExec(methodCode, methodName, clinicPrePriceVo, ClinicPrePriceVoResponse.class);
    }
    
    /**
     * 门诊缴费订单支付
     * 
     * @param payClinicOrderVo
     * @return
     */
    public ResCommon<PayClinicOrderVoResponse> payClinicOrder(PayClinicOrderVo payClinicOrderVo) {
    	String methodCode = "payClinicOrder";
    	String methodName = "门诊缴费订单支付";
    	
    	return doExec(methodCode, methodName, payClinicOrderVo, PayClinicOrderVoResponse.class);
    }
    
    /**
     * 设置代煎配送
     * 
     * @param firedAndDeliveredVo
     * @return
     */
    public ResCommon<List<FiredAndDeliveredVoResponse>> setFiredAndDelivered(FiredAndDeliveredVo firedAndDeliveredVo) {
    	String methodCode = "setFiredAndDelivered";
    	String methodName = "设置代煎配送";
    	
    	return doExecList(methodCode, methodName, firedAndDeliveredVo, FiredAndDeliveredVoResponse.class);
    }
    
    /**
     * 设置代煎费用
     * 
     * @param firedFeeVo
     * @return
     */
    public ResCommon<FiredFeeVoResponse> setFiredFee(FiredFeeVo firedFeeVo) {
    	String methodCode = "setFiredFee";
    	String methodName = "设置代煎费用";
    	
    	return doExec(methodCode, methodName, firedFeeVo, FiredFeeVoResponse.class);
    }
    
    /**
     * 设置配送信息
     * <p>
     * 配送信息只作暂时缓存，待用户支付缴费之后，再把配送信息发送到第三方的药物配送企业
     * 
     * @param deliveryVo
     * @return
     */
    public ResCommon<Void> setDelivery(DeliveryVo deliveryVo) {
    	String methodCode = "setDelivery";
    	String methodName = "设置配送信息";
    	
    	return doExec(methodCode, methodName, deliveryVo, null);
    }
    
    /**
     * 配送信息查询
     * 
     * @param deliveryInfoVo
     * @return
     */
    public ResCommon<List<DeliveryInfoVoResponse>> getDeliveryInfo(DeliveryInfoVo deliveryInfoVo) {
    	String methodCode = "getDeliveryInfo";
    	String methodName = "配送信息查询";

    	return doExecList(methodCode, methodName, deliveryInfoVo, DeliveryInfoVoResponse.class);
    }
    
    /**
     * 门诊已缴费记录查询
     * 
     * @param payVo
     * @return
     */
    public ResCommon<List<PayVoResponse>> listClinicPay(PayVo payVo) {
    	String methodCode = "listClinicPay";
    	String methodName = "门诊已缴费记录查询";
    	
    	return doExecList(methodCode, methodName, payVo, PayVoResponse.class);
    }
    
    /**
     * 门诊已缴费记录明细查询
     * 
     * @param payDetailVo
     * @return
     */
    public ResCommon<List<PayDetailVoResponse>> getClinicPayDetail(PayDetailVo payDetailVo) {
    	String methodCode = "getClinicPayDetail";
    	String methodName = "门诊已缴费记录明细查询";
    	
    	return doExecList(methodCode, methodName, payDetailVo, PayDetailVoResponse.class);
    }
    
    /**
     * 门诊医保预结算
     * 
     * @param clinicInsuranceVo
     * @return
     */
    public ResCommon<ClinicInsuranceVoResponse> getClinicInsurance(ClinicInsuranceVo clinicInsuranceVo) {
    	String methodCode = "getClinicInsurance";
    	String methodName = "门诊医保预结算";

    	return doExec(methodCode, methodName, clinicInsuranceVo, ClinicInsuranceVoResponse.class);
    }
    
    /**
     * 门诊医保结算
     * 
     * @param settleClinicInsuranceVo
     * @return
     */
    public ResCommon<Void> settleClinicInsurance(SettleClinicInsuranceVo settleClinicInsuranceVo) {
    	String methodCode = "settleClinicInsurance";
    	String methodName = "门诊医保结算";

    	return doExec(methodCode, methodName, settleClinicInsuranceVo, null);
    }
    
    /**
     * 门诊医保退款
     * 
     * @param refundClinicInsurance
     * @return
     */
    public ResCommon<Void> refundClinicInsurance(RefundClinicInsuranceVo refundClinicInsuranceVo) {
    	String methodCode = "refundClinicInsurance";
    	String methodName = "门诊医保退款";

    	return doExec(methodCode, methodName, refundClinicInsuranceVo, null);
    }
    
    /**
     * 门诊医保退款支付确认
     * 
     * @param refundClinicInsuranceZfqr
     * @return
     */
    public ResCommon<Void> refundClinicInsuranceZfqr(RefundClinicInsuranceZfqrVo refundClinicInsuranceZfqrVo) {
    	String methodCode = "refundClinicInsuranceZfqr";
    	String methodName = "门诊医保退款支付确认";

    	return doExec(methodCode, methodName, refundClinicInsuranceZfqrVo, null);
    }
    
    /**
     * 门诊缴费确认
     * 
     * @param ackClinicPayVo
     * @return
     */
    public ResCommon<AckClinicPayVoResponse> ackClinicPay(AckClinicPayVo ackClinicPayVo) {
    	String methodCode = "ackClinicPay";
    	String methodName = "门诊缴费确认";

    	return doExec(methodCode, methodName, ackClinicPayVo, AckClinicPayVoResponse.class);
	}
    
    /**
     * 门诊异常确认
     * 
     * @param ackClinicExceptionVo
     * @return
     */
    public ResCommon<AckClinicExceptionVoResponse> ackClinicException(AckClinicExceptionVo ackClinicExceptionVo) {
    	String methodCode = "ackClinicException";
    	String methodName = "门诊异常确认";

    	return doExec(methodCode, methodName, ackClinicExceptionVo, AckClinicExceptionVoResponse.class);
	}
    
    public ResCommon<List<ClinicQueueVoResponse>> getClinicQueue(ClinicQueueVo clinicQueueVo) {
		String methodCode = "getClinicQueue";
    	String methodName = "门诊候诊信息查询";
    	
    	return doExecList(methodCode, methodName, clinicQueueVo, ClinicQueueVoResponse.class);
	}
    
    public ResCommon<List<ClinicGuidanceVoResponse>> getClinicGuidance(ClinicGuidanceVo clinicGuidanceVo) {
		String methodCode = "getClinicGuidance";
    	String methodName = "门诊导诊信息查询";
    	
    	return doExecList(methodCode, methodName, clinicGuidanceVo, ClinicGuidanceVoResponse.class);
	}
    
    public ResCommon<PrescriptionUploadVoResponse> prescriptionUpload(PrescriptionUploadVo prescriptionUploadVo) {
    	String methodCode = "prescriptionUpload";
    	String methodName = "上传处方明细";

    	return doExec(methodCode, methodName, prescriptionUploadVo, PrescriptionUploadVoResponse.class);
	}
}
